/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.saber.certificacao.modelos.comparadores;

import br.com.saber.certificacao.modelos.Questao;
import java.util.Comparator;
import java.util.Random;

/**
 * Comparator utilizado para ordenar aleatoriamente
 * as questões da prova.
 * @author gbvbahia
 */
public class QuestaoAleatoriaComparator implements Comparator<Questao> {

    @Override
    public int compare(Questao o1, Questao o2) {
        Random random = new Random();
        int i = random.nextInt(2);
        return i == 1 ? 1 : -1;
    }
    
}
